Dynamic shared data object masking

ABSTRACT

A shared database platform implements dynamic masking on data shared between users where specific data is masked, transformed, or otherwise modified based on preconfigured functions that are associated with user roles. The shared database platform can implement the masking at runtime dynamically in response to users requesting access to a database object that is associated with one or more masking policies.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a Continuation of U.S. patent application Ser. No.16/698,142, filed on Nov. 27, 2019, the contents of which areincorporated by reference herein in their entirety.

TECHNICAL FIELD

The present disclosure generally relates to special-purpose machinesthat manage databases and improvements to such variants, and to thetechnologies by which such special-purpose machines become improvedcompared to other special-purpose machines for transforming data indatabases.

BACKGROUND

Data can be uploaded to a database and access to the database data canbe managed by a database administrator. More recently cloud databaseservices have risen in popularity due to the ease of which new databaseinstances can be created to store data. While the new cloud databaseservices allow databases to be easily created, the cloud databaseservices create new issues with regard to data privacy. For instance, itcan be difficult to create access for specific individuals to specificdata within a given database in a way that is both secure and scalableas the amount of data increases.

BRIEF DESCRIPTION OF THE DRAWINGS

Various ones of the appended drawings merely illustrate exampleembodiments of the present disclosure and should not be considered aslimiting its scope.

FIG. 1 illustrates an example computing environment in which anetwork-based data warehouse system can implement dynamic share maskingof database objects, according to some example embodiments.

FIG. 2 is a block diagram illustrating components of a compute servicemanager, according to some example embodiments.

FIG. 3 is a block diagram illustrating components of an executionplatform, according to some example embodiments.

FIGS. 4A-4C show example data architectures for sharing database objectsusing system, according to some example embodiments.

FIG. 5 shows an example database architecture for sharing data betweenentities using system, according to some example embodiments.

FIG. 6 shows example database objects, according to some exampleembodiments.

FIG. 7A-7E show example user interfaces for dynamic masking of shareddata, according to some example embodiments.

FIG. 8 shows an example data architecture for dynamic masking of shareddata objects, according to some example embodiments.

FIG. 9 shows an example policy data architecture, according to someexample embodiments.

FIG. 10 is a flow diagram of a method for configuring a share maskpolicy with the resource item, according to some example embodiments.

FIG. 11 is a flow diagram of a method for interacting with thedynamically masked data, according to some example embodiments.

FIG. 12 is a flow diagram of a method for dynamically masking shared adatabase object, according to some example embodiments.

FIG. 13 illustrates a diagrammatic representation of a machine in theform of a computer system within which a set of instructions may beexecuted for causing the machine to perform any one or more of themethodologies discussed herein, in accordance with some embodiments ofthe present disclosure.

DETAILED DESCRIPTION

The description that follows includes systems, methods, techniques,instruction sequences, and computing machine program products thatembody illustrative embodiments of the disclosure. In the followingdescription, for the purposes of explanation, numerous specific detailsare set forth in order to provide an understanding of variousembodiments of the inventive subject matter. It will be evident,however, to those skilled in the art, that embodiments of the inventivesubject matter may be practiced without these specific details. Ingeneral, well-known instruction instances, protocols, structures, andtechniques are not necessarily shown in detail.

As discussed, it can be difficult to create access and share data in asecure way that is scalable as the amount of data increases. To thisend, a shared database platform can implement dynamic masking on datashared between users where specific data is masked, transformed, orotherwise modified based on preconfigured functions that are associatedwith user roles. The shared database platform can implement the maskingat runtime dynamically in response to users requesting access to adatabase object that is associated with one or more masking policies.

FIG. 1 illustrates an example shared data processing platform 100 inwhich a network-based data warehouse system 102 implements dynamicmasking of shared data objects, in accordance with some embodiments ofthe present disclosure. To avoid obscuring the inventive subject matterwith unnecessary detail, various functional components that are notgermane to conveying an understanding of the inventive subject matterhave been omitted from the figures. However, a skilled artisan willreadily recognize that various additional functional components may beincluded as part of the shared data processing platform 100 tofacilitate additional functionality that is not specifically describedherein.

As shown, the shared data processing platform 100 comprises thenetwork-based data warehouse system 102, a cloud computing storageplatform 104 (e.g., a storage platform, an AWS® service such as S3,Microsoft Azure®, or Google Cloud Services®), and a remote computingdevice 106. The network-based data warehouse system 102 is anetwork-based system used for storing and accessing data (e.g.,internally storing data, accessing external remotely located data) in anintegrated manner, and reporting and analysis of the integrated datafrom the one or more disparate sources (e.g., the cloud computingstorage platform 104). The cloud computing storage platform 104comprises a plurality of computing machines and provides on-demandcomputer system resources such as data storage and computing power tothe network-based data warehouse system 102.

The remote computing device 106 (e.g., a user device such as a laptopcomputer) comprises one or more computing machines (e.g., a user devicesuch as a laptop computer) that execute a remote software component 108(e.g., browser accessed cloud service) provide additional functionalityto users of the network-based data warehouse system 102. The remotesoftware component 108 comprises a set of machine-readable instructions(e.g., code) that, when executed by the remote computing device 106,cause the remote computing device 106 to provide certain functionality.The remote software component 108 may operate on input data andgenerates result data based on processing, analyzing, or otherwisetransforming the input data. As an example, the remote softwarecomponent 108 can be a data provider or data consumer that processesdynamically masked shared data objects, as discussed in further detailbelow.

The network-based data warehouse system 102 comprises an accessmanagement system 110, a compute service manager 112, an executionplatform 114, and a database 116. The access management system 110enables administrative users to manage access to resources and servicesprovided by the network-based data warehouse system 102. Administrativeusers can create and manage users, roles, and groups, and usepermissions to allow or deny access to resources and services. Theaccess management system 110 can store share data that securely managesshared access to the storage resources of the cloud computing storageplatform 104 amongst different users of the network-based data warehousesystem 102, as discussed in further detail below.

The compute service manager 112 coordinates and manages operations ofthe network-based data warehouse system 102. The compute service manager112 also performs query optimization and compilation as well as managingclusters of computing services that provide compute resources (e.g.,virtual warehouses, virtual machines, EC2 clusters). The compute servicemanager 112 can support any number of client accounts such as end usersproviding data storage and retrieval requests, system administratorsmanaging the systems and methods described herein, and othercomponents/devices that interact with compute service manager 112.

The compute service manager 112 is also coupled to database 116, whichis associated with the entirety of data stored the shared dataprocessing platform 100. The database 116 stores data pertaining tovarious functions and aspects associated with the network-based datawarehouse system 102 and its users. For example, data to be dynamicallymasked can be stored and accessed on the cloud computing storageplatform 104 (e.g., on S3) or stored and accessed on the database 116that is local to the network-based data warehouse system 102, accordingto some example embodiments.

In some embodiments, database 116 includes a summary of data stored inremote data storage systems as well as data available from one or morelocal caches. Additionally, database 116 may include informationregarding how data is organized in the remote data storage systems andthe local caches. Database 116 allows systems and services to determinewhether a piece of data needs to be accessed without loading oraccessing the actual data from a storage device. The compute servicemanager 112 is further coupled to an execution platform 114, whichprovides multiple computing resources (e.g., virtual warehouses) thatexecute various data storage and data retrieval tasks, as discussed ingreater detail below.

Execution platform 114 is coupled to multiple data storage devices 124-1to 124-n that are part of a cloud computing storage platform 104. Insome embodiments, data storage devices 124-1 to 124-n are cloud-basedstorage devices located in one or more geographic locations. Forexample, data storage devices 124-1 to 124-n may be part of a publiccloud infrastructure or a private cloud infrastructure. Data storagedevices 124-1 to 124-n may be hard disk drives (HDDs), solid statedrives (SSDs), storage clusters, Amazon S3 storage systems or any otherdata storage technology. Additionally, cloud computing storage platform104 may include distributed file systems (such as Hadoop DistributedFile Systems (HDFS)), object storage systems, and the like.

The execution platform 114 comprises a plurality of compute nodes (e.g.,virtual warehouses). A set of processes on a compute node executes aquery plan compiled by the compute service manager 112. The set ofprocesses can include: a first process to execute the query plan; asecond process to monitor and delete micro-partition files using a leastrecently used (LRU) policy, and implement an out of memory (OOM) errormitigation process; a third process that extracts health informationfrom process logs and status information to send back to the computeservice manager 112; a fourth process to establish communication withthe compute service manager 112 after a system boot; and a fifth processto handle all communication with a compute cluster for a given jobprovided by the compute service manager 112 and to communicateinformation back to the compute service manager 112 and other computenodes of the execution platform 114.

The cloud computing storage platform 104 also comprises an accessmanagement system 118 and an API gateway 120. As with the accessmanagement system 110, the access management system 118 allows users tocreate and manage users, roles, and groups, and use permissions to allowor deny access to cloud services and resources. The access managementsystem 110 of the network-based data warehouse system 102 and the accessmanagement system 118 of the cloud computing storage platform 104 cancommunicate and share information so as to enable access and managementof resources and services shared by users of both the network-based datawarehouse system 102 and the cloud computing storage platform 104. TheAPI gateway 120 handles tasks involved in accepting and processingconcurrent API calls, including traffic management, authorization andaccess control, monitoring, and API version management. The API gateway120 provides HTTP proxy service for creating, publishing, maintaining,securing, and monitoring APIs (e.g., REST APIs).

In some embodiments, communication links between elements of the shareddata processing platform 100 are implemented via one or more datacommunication networks. These data communication networks may utilizeany communication protocol and any type of communication medium. In someembodiments, the data communication networks are a combination of two ormore data communication networks (or sub-networks) coupled to oneanother. In alternate embodiments, these communication links areimplemented using any type of communication medium and any communicationprotocol.

As shown in FIG. 1, data storage devices 124-1 to 124-N are decoupledfrom the computing resources associated with the execution platform 114.That is, new virtual warehouses can be created and terminated in theexecution platform 114 and additional data storage devices can becreated and terminated on the 104 in an independent manner. Thisarchitecture supports dynamic changes to the network-based datawarehouse system 102 based on the changing data storage/retrieval needsas well as the changing needs of the users and systems accessing theshared data processing platform 100. The support of dynamic changesallows network-based data warehouse system 102 to scale quickly inresponse to changing demands on the systems and components withinnetwork-based data warehouse system 102. The decoupling of the computingresources from the data storage devices supports the storage of largeamounts of data without requiring a corresponding large amount ofcomputing resources. Similarly, this decoupling of resources supports asignificant increase in the computing resources utilized at a particulartime without requiring a corresponding increase in the available datastorage resources. Additionally, the decoupling of resources enablesdifferent accounts to handle creating additional compute resources toprocess data shared by other users without affecting the other user'ssystems. For instance, a data provider may have three compute resourcesand share data with a data consumer, and the data consumer may generatenew compute resources to execute queries against the shared data, wherethe new compute resources are managed by the data consumer and do notaffect or interact with the compute resources of the data provider.

Compute service manager 112, database 116, execution platform 114, cloudcomputing storage platform 104, and remote computing device 106 areshown in FIG. 1 as individual components. However, each of computeservice manager 112, database 116, execution platform 114, cloudcomputing storage platform 104, and remote computing environment may beimplemented as a distributed system (e.g., distributed across multiplesystems/platforms at multiple geographic locations) connected by APIsand access information (e.g., tokens, login data). Additionally, each ofcompute service manager 112, database 116, execution platform 114, andcloud computing storage platform 104 can be scaled up or down(independently of one another) depending on changes to the requestsreceived and the changing needs of shared data processing platform 100.Thus, in the described embodiments, the network-based data warehousesystem 102 is dynamic and supports regular changes to meet the currentdata processing needs.

During typical operation, the network-based data warehouse system 102processes multiple jobs (e.g., queries) determined by the computeservice manager 112. These jobs are scheduled and managed by the computeservice manager 112 to determine when and how to execute the job. Forexample, the compute service manager 112 may divide the job intomultiple discrete tasks and may determine what data is needed to executeeach of the multiple discrete tasks. The compute service manager 112 mayassign each of the multiple discrete tasks to one or more nodes of theexecution platform 114 to process the task. The compute service manager112 may determine what data is needed to process a task and furtherdetermine which nodes within the execution platform 114 are best suitedto process the task. Some nodes may have already cached the data neededto process the task (due to the nodes having recently downloaded thedata from the cloud computing storage platform 104 for a previous job)and, therefore, be a good candidate for processing the task. Metadatastored in the database 116 assists the compute service manager 112 indetermining which nodes in the execution platform 114 have alreadycached at least a portion of the data needed to process the task. One ormore nodes in the execution platform 114 process the task using datacached by the nodes and, if necessary, data retrieved from the cloudcomputing storage platform 104. It is desirable to retrieve as much dataas possible from caches within the execution platform 114 because theretrieval speed is typically much faster than retrieving data from thecloud computing storage platform 104.

As shown in FIG. 1, the shared data processing platform 100 separatesthe execution platform 114 from the cloud computing storage platform104. In this arrangement, the processing resources and cache resourcesin the execution platform 114 operate independently of the data storageresources 124-1 to 124-n in the cloud computing storage platform 104.Thus, the computing resources and cache resources are not restricted tospecific data storage resources 124-1 to 124-n. Instead, all computingresources and all cache resources may retrieve data from, and store datato, any of the data storage resources in the cloud computing storageplatform 104.

FIG. 2 is a block diagram illustrating components of the compute servicemanager 112, in accordance with some embodiments of the presentdisclosure. As shown in FIG. 2, a request processing service 202 managesreceived data storage requests and data retrieval requests (e.g., jobsto be performed on database data). For example, the request processingservice 202 may determine the data necessary to process a received query(e.g., a data storage request or data retrieval request). The data maybe stored in a cache within the execution platform 114 or in a datastorage device in cloud computing storage platform 104. A managementconsole service 204 supports access to various systems and processes byadministrators and other system managers. Additionally, the managementconsole service 204 may receive a request to execute a job and monitorthe workload on the system.

The share mask engine 225 manages dynamically masking data managed bythe shared data processing platform 100 for different users, based onroles and functions, as discussed in further detail below.

The compute service manager 112 also includes a job compiler 206, a joboptimizer 208 and a job executor 210. The job compiler 206 parses a jobinto multiple discrete tasks and generates the execution code for eachof the multiple discrete tasks. The job optimizer 208 determines thebest method to execute the multiple discrete tasks based on the datathat needs to be processed. The job optimizer 208 also handles variousdata pruning operations and other data optimization techniques toimprove the speed and efficiency of executing the job. The job executor210 executes the execution code for jobs received from a queue ordetermined by the compute service manager 112.

A job scheduler and coordinator 212 sends received jobs to theappropriate services or systems for compilation, optimization, anddispatch to the execution platform 114. For example, jobs may beprioritized and processed in that prioritized order. In an embodiment,the job scheduler and coordinator 212 determines a priority for internaljobs that are scheduled by the compute service manager 112 with other“outside” jobs such as user queries that may be scheduled by othersystems in the database but may utilize the same processing resources inthe execution platform 114. In some embodiments, the job scheduler andcoordinator 212 identifies or assigns particular nodes in the executionplatform 114 to process particular tasks. A virtual warehouse manager214 manages the operation of multiple virtual warehouses implemented inthe execution platform 114. As discussed below, each virtual warehouseincludes multiple execution nodes that each include a cache and aprocessor (e.g., a virtual machine, a operating system level containerexecution environment).

Additionally, the compute service manager 112 includes a configurationand metadata manager 216, which manages the information related to thedata stored in the remote data storage devices and in the local caches(i.e., the caches in execution platform 114). The configuration andmetadata manager 216 uses the metadata to determine which datamicro-partitions need to be accessed to retrieve data for processing aparticular task or job. A monitor and workload analyzer 218 overseeprocesses performed by the compute service manager 112 and manages thedistribution of tasks (e.g., workload) across the virtual warehouses andexecution nodes in the execution platform 114. The monitor and workloadanalyzer 218 also redistribute tasks, as needed, based on changingworkloads throughout the network-based data warehouse system 102 and mayfurther redistribute tasks based on a user (e.g., “external”) queryworkload that may also be processed by the execution platform 114. Theconfiguration and metadata manager 216 and the monitor and workloadanalyzer 218 are coupled to a data storage device 220. Data storagedevice 220 in FIG. 2 represent any data storage device within thenetwork-based data warehouse system 102. For example, data storagedevice 220 may represent caches in execution platform 114, storagedevices in cloud computing storage platform 104, or any other storagedevice.

FIG. 3 is a block diagram illustrating components of the executionplatform 114, in accordance with some embodiments of the presentdisclosure. As shown in FIG. 3, execution platform 114 includes multiplevirtual warehouses, which are elastic dusters of compute instances, suchas virtual machines. In the example illustrated, the virtual warehousesinclude virtual warehouse 1, virtual warehouse 2, and virtual warehousen. Each virtual warehouse (e.g., EC2 duster) includes multiple executionnodes (e.g., virtual machines) that each include a data cache and aprocessor. The virtual warehouses can execute multiple tasks in parallelby using the multiple execution nodes. As discussed herein, executionplatform 114 can add new virtual warehouses and drop existing virtualwarehouses in real-time based on the current processing needs of thesystems and users. This flexibility allows the execution platform 114 toquickly deploy large amounts of computing resources when needed withoutbeing forced to continue paying for those computing resources when theyare no longer needed. All virtual warehouses can access data from anydata storage device (e.g., any storage device in cloud computing storageplatform 104).

Although each virtual warehouse shown in FIG. 3 includes three executionnodes, a particular virtual warehouse may include any number ofexecution nodes. Further, the number of execution nodes in a virtualwarehouse is dynamic, such that new execution nodes are created whenadditional demand is present, and existing execution nodes are deletedwhen they are no longer necessary (e.g., upon a query or jobcompletion).

Each virtual warehouse is capable of accessing any of the data storagedevices 124-1 to 124-n shown in FIG. 1. Thus, the virtual warehouses arenot necessarily assigned to a specific data storage device 124-1 to124-n and, instead, can access data from any of the data storage devices124-1 to 124-n within the cloud computing storage platform 104.Similarly, each of the execution nodes shown in FIG. 3 can access datafrom any of the data storage devices 124-1 to 124-n. For instance, thestorage device 124-1 of a first user (e.g. provider account user) may beshared with a worker node in a virtual warehouse of another user (e.g.,consumer account user), such that the another user can create a database(e.g. read only database) and use the data in storage device 124-1directly without needing to copy the data (e.g., copy it to new diskmanaged by the consumer account user). In some embodiments, a particularvirtual warehouse or a particular execution node may be temporarilyassigned to a specific data storage device, but the virtual warehouse orexecution node may later access data from any other data storage device.

In the example of FIG. 3, virtual warehouse 1 includes three executionnodes 302-1, 302-2, and 302-n. Execution node 302-1 includes a cache304-1 and a processor 306-1. Execution node 302-2 includes a cache 304-2and a processor 306-2. Execution node 302-n includes a cache 304-n and aprocessor 306-n. Each execution node 302-1, 302-2, and 302-n isassociated with processing one or more data storage and/or dataretrieval tasks. For example, a virtual warehouse may handle datastorage and data retrieval tasks associated with an internal service,such as a clustering service, a materialized view refresh service, afile compaction service, a storage procedure service, or a file upgradeservice. In other implementations, a particular virtual warehouse mayhandle data storage and data retrieval tasks associated with aparticular data storage system or a particular category of data.

Similar to virtual warehouse 1 discussed above, virtual warehouse 2includes three execution nodes 312-1, 312-2, and 312-n. Execution node312-a includes a cache 314-1 and a processor 316-1. Execution node 312-nincludes a cache 314-n and a processor 316-n. Execution node 312-nincludes a cache 314-n and a processor 316-n. Additionally, virtualwarehouse 3 includes three execution nodes 322-1, 322-2, and 322-n.Execution node 322-1 includes a cache 324-1 and a processor 326-1.Execution node 322-2 includes a cache 324-2 and a processor 326-2.Execution node 322-n includes a cache 324-n and a processor 326-n.

In some embodiments, the execution nodes shown in FIG. 3 are statelesswith respect to the data the execution nodes are caching. For example,these execution nodes do not store or otherwise maintain stateinformation about the execution node, or the data being cached by aparticular execution node. Thus, in the event of an execution nodefailure, the failed node can be transparently replaced by another node.Since there is no state information associated with the failed executionnode, the new (replacement) execution node can easily replace the failednode without concern for recreating a particular state.

Although the execution nodes shown in FIG. 3 each include one data cacheand one processor, alternate embodiments may include execution nodescontaining any number of processors and any number of caches.Additionally, the caches may vary in size among the different executionnodes. The caches shown in FIG. 3 store, in the local execution node(e.g., local disk), data that was retrieved from one or more datastorage devices in cloud computing storage platform 104 (e.g., S3objects recently accessed by the given node). In some exampleembodiments, the cache stores file headers and individual columns offiles as a query downloads only columns necessary for that query.

To improve cache hits and avoid overlapping redundant data stored in thenode caches, the job optimizer 208 assigns input file sets to the nodesusing consistent hashing scheme to hash over table file names of thedata accessed (e.g., data in database 116 or database 122). Subsequentor concurrent queries accessing the same table file will therefor beperformed on the same node, according to some example embodiments.

As discussed, the nodes and virtual warehouses may change dynamically inresponse to environmental conditions (e.g., disaster scenarios,hardware/software issues (e.g., malfunctions), or administrative changes(e.g., changing from a large cluster to smaller cluster to lower costs).In some example embodiments, when the set of nodes changes, no data isreshuffled immediately. Instead, the least recently used replacementpolicy is implemented to eventually replace the lost cache contents overmultiple jobs. Thus, the caches reduce or eliminate the bottleneckproblems occurring in platforms that consistently retrieve data fromremote storage systems. Instead of repeatedly accessing data from theremote storage devices, the systems and methods described herein accessdata from the caches in the execution nodes which is significantlyfaster and avoids the bottleneck problem discussed above. In someembodiments, the caches are implemented using high-speed memory devicesthat provide fast access to the cached data. Each cache can store datafrom any of the storage devices in the cloud computing storage platform104.

Further, the cache resources and computing resources may vary betweendifferent execution nodes. For example, one execution node may containsignificant computing resources and minimal cache resources, making theexecution node useful for tasks that require significant computingresources. Another execution node may contain significant cacheresources and minimal computing resources, making this execution nodeuseful for tasks that require caching of large amounts of data. Yetanother execution node may contain cache resources providing fasterinput-output operations, useful for tasks that require fast scanning oflarge amounts of data. In some embodiments, the execution platform 114implements skew handling to distribute work amongst the cache resourcesand computing resources associated with a particular execution, wherethe distribution may be further based on the expected tasks to beperformed by the execution nodes. For example, an execution node may beassigned more processing resources if the tasks performed by theexecution node become more processor-intensive. Similarly, an executionnode may be assigned more cache resources if the tasks performed by theexecution node require a larger cache capacity. Further, some nodes maybe executing much slower than others due to various issues (e.g.,virtualization issues, network overhead). In some example embodiments,the imbalances are addressed at the scan level using a file stealingscheme. In particular, whenever a node process completes scanning itsset of input files, it requests additional files from other nodes. Ifthe one of the other nodes receives such a request, the node analyzesits own set (e.g., how many files are left in the input file set whenthe request is received), and then transfers ownership of one or more ofthe remaining files for the duration of the current job (e.g., query).The requesting node (e.g., the file stealing node) then receives thedata (e.g., header data) and downloads the files from the cloudcomputing storage platform 104 (e.g., from data storage device 124-1),and does not download the files from the transferring node. In this way,lagging nodes can transfer files via file stealing in a way that doesnot worsen the load on the lagging nodes.

Although virtual warehouses 1, 2, and n are associated with the sameexecution platform 114, the virtual warehouses may be implemented usingmultiple computing systems at multiple geographic locations. Forexample, virtual warehouse 1 can be implemented by a computing system ata first geographic location, while virtual warehouses 2 and n areimplemented by another computing system at a second geographic location.In some embodiments, these different computing systems are cloud-basedcomputing systems maintained by one or more different entities.

Additionally, each virtual warehouse is shown in FIG. 3 as havingmultiple execution nodes. The multiple execution nodes associated witheach virtual warehouse may be implemented using multiple computingsystems at multiple geographic locations. For example, an instance ofvirtual warehouse 1 implements execution nodes 302-1 and 302-2 on onecomputing platform at a geographic location and implements executionnode 302-n at a different computing platform at another geographiclocation. Selecting particular computing systems to implement anexecution node may depend on various factors, such as the level ofresources needed for a particular execution node (e.g., processingresource requirements and cache requirements), the resources availableat particular computing systems, communication capabilities of networkswithin a geographic location or between geographic locations, and whichcomputing systems are already implementing other execution nodes in thevirtual warehouse.

Execution platform 114 is also fault tolerant. For example, if onevirtual warehouse fails, that virtual warehouse is quickly replaced witha different virtual warehouse at a different geographic location.

A particular execution platform 114 may include any number of virtualwarehouses. Additionally, the number of virtual warehouses in aparticular execution platform is dynamic, such that new virtualwarehouses are created when additional processing and/or cachingresources are needed. Similarly, existing virtual warehouses may bedeleted when the resources associated with the virtual warehouse are nolonger necessary.

In some embodiments, the virtual warehouses may operate on the same datain cloud computing storage platform 104, but each virtual warehouse hasits own execution nodes with independent processing and cachingresources. This configuration allows requests on different virtualwarehouses to be processed independently and with no interferencebetween the requests. This independent processing, combined with theability to dynamically add and remove virtual warehouses, supports theaddition of new processing capacity for new users without impacting theperformance observed by the existing users.

FIGS. 4A-4C show example data architectures for sharing database objectsusing network-based data warehouse system 102, according to some exampleembodiments. As discussed the access management system 110 can manageshare data for sharing data between storage devices (e.g., differentstorage devices of a single account or sharing data in a storage deviceallocated to a first sharer account to a second consumer account). Insome example embodiments, the access management system 110 implementsrole-based access control to govern access to objects in customeraccounts. The role-based access control consists of two mechanisms:roles and grants. In one embodiment, roles are special objects in anend-user account (e.g., provider account, consumer account) that areassigned to users. Grants between roles and database objects define whatprivileges a role has on these objects. For example, a role that has ausage grant on a database can “see” this database when executing thecommand “show databases”; a role that has a select grant on a table canread from this table but not write to the table. The role would need tohave a modify grant on the table to be able to write to it.

FIG. 4A is a schematic block diagram illustrating role-based access toobjects in customer accounts of a multi-tenant shared database platform(e.g., platform 120 as accessed by system 102), according to someexample embodiments. In the following examples, a user account “Al”corresponds to a data provider account that manages a data providervirtual warehouse (e.g., virtual warehouse 1 in FIG. 3A) and anotherdifferent user account A2 corresponds to a data consumer account thatinitiates data consumer virtual warehouses (e.g., virtual warehouse 2 inFIG. 3A).

As illustrated, the A1 account contains role Rl, which has grants to allobjects in the object hierarchy. Assuming these grants are usage grantsbetween Rl and database objects Dl and D2, shares Sl and S2, and selectgrants between Rl and table object T, view object Vl, function objectF2, sequence object Q2, table object T2, a user with activated role Rlcan see all objects and read data from all tables, views, and sequencesand can execute function F2 within account Al.

The account A2 contains role R3, which has grants to all objects in theobject hierarchy. Assuming these grants are usage grants between R3 andD3, S3, and select a grant between R3 and T3, a user with activated roleR3 can see all objects and read data from all tables, views, andsequences within account A2.

FIG. 4B illustrates a usage grant between roles. With role-based accesscontrol, it is also possible to grant usage from one role to anotherrole. A role that has a usage grant to another role “inherits” allaccess privileges of the other role. For example, in role R2 has a usagegrant on role Rl. A user (e.g., with corresponding authorizationdetails) with activated role R2 can see and read from all objectsbecause role R2 inherits all grants from role Rl.

According to one embodiment, usage grants are granted across differentaccounts. An account that shares data may be referred to herein as a“sharer account” and an account with which the data is shared may bereferred to herein as a “target account”. Some embodiments disclosedherein allow for instantaneous, zero-copy, easy-controllablecross-account sharing of data. In some embodiments, in order to sharedata with another account, a sharer account may generate a share object.Within the share object, a role may be created and a user of the shareraccount may indicate access rights or grants that are available to therole and/or foreign accounts (or target accounts) that will be grantedrights under the role. A target account may then be able to identifyshare objects or roles in other account to which the target account hasbeen granted rights or access. In one embodiment, share objects in asharer account may be imported into the target account using aliasobjects and cross-account role grants.

The sharer account creates a new type of object, the share object. Theshare object has a unique name to be identified within the shareraccount. For example, the name may need to be unique within an account,but not necessarily across accounts. Share objects may be created,modified, and deleted by referencing them via their name in the shareraccount.

In some embodiments, each share object contains a single role. Grantsbetween this role and objects define what objects are being shared andwith what privileges these objects are shared. The role and grants maybe similar to any other role and grant system in the implementation ofrole based access control. By modifying the set of grants attached tothe role in a share objects, more objects may be shared (by addinggrants to the role), fewer objects may be shared (by revoking grantsfrom the role), or objects may be shared with different privileges (bychanging the type of grant, for example to allow write access to ashared table object that was previously read-only).

In one embodiment, a share objects also contains a list of references toother customer accounts. Only these accounts that are specifically inthe share object may be allowed to look up, access, and/or import fromthis share object. By modifying the list of references of other customeraccounts, the share object can be made accessible to more accounts or berestricted to fewer accounts.

FIG. 4C is a schematic block diagram illustrating logical grants andlinks between different accounts. A database alias object DS is createdin account A2. Database alias D5 references database D2 via link Ll.Role R3 has a usage grant G1 on database DS. Role R3 has a second usagegrant G2 to role R4 in customer account Al. Grant G2 is a cross-accountgrant between accounts Al and A2. Role-based access control allows auser in account A2 with activated role R3 to access data in account Al.For example, if a user in account A2 wants to read data in table T2,role-based access control allows that because role R3 has a usage grantof role R4 and role R4, in turn, has a select grant on table T2. By wayof illustration, a user with activated role R3 may access T2 by runninga query or selection directed to “D5.S2.T2” (where access to T2 isthrough S2 and D5).

Using object aliases and cross-account grants from a role in the targetaccount to a role in the sharer account allows users in the targetaccount to access information in the sharer account. In this way, adatabase system may enable sharing of data between different customeraccounts in an instantaneous, zero-copy, easy-controllable fashion. Thesharing can be instantaneous because alias objects and cross-accountgrants can be created in milliseconds. The sharing can be zero-copybecause no data has to be duplicated in the process. For example, allqueries, or selections can be made directly to the shared object in thesharer account without creating a duplicate in the target account. Thesharing is also easy to control because it utilizes easy-to-usetechniques of role-based access control. Additionally, in embodimentswith separated storage and compute, there is no contention amongcomputing resources when executing queries on shared data. Thus,different virtual warehouses in different customer accounts mayindividually process shared data. For example, a first virtual warehousefor a first account may process a database query or statement using datashared by a sharer account and a second virtual warehouse for a secondaccount, or the sharer account, may process a database query orstatement using the shared data of the sharer account.

FIG. 5 shows an example database architecture 500 for sharing databetween entities (e.g., users) using the shared data processing platform100, according to some example embodiments. In the example displayed, adata provider account 505 corresponds to a user device (e.g., laptop) ofa user (e.g., an account of a first user at a first company, department,etc., that creates and stores data) logged in as an administrator of thedata 510. For instance, provider account 505 generates and stores thedata in the shared data processing platform 100. The data 510 caninclude data that is uploaded to the network-based data warehouse system102 (e.g., for storage in database 116 or caches of nodes in 114, ordata that is located on the cloud computing storage platform 104). Theconsumer account 515 corresponds to a user device of another user (e.g.,another user at another company, different department within the samecompany, etc., using a laptop to login an create an active session ofconsumer account 515) with which the provider account 505 seeks to sharethe data 510 via the shared data processing platform 100. For example,data provider account 505 and data consumer account 515 can both be runfrom different remote computing devices, such as remote computing device106, that can access, modify or otherwise process data 510 usingnetwork-based data warehouse system 102 (e.g., based on permissions,roles, session information managed by access management system 110and/or access management system 118). In the illustrated example, thedata 510 includes databases (e.g., database1, database2, database3).Each database consists of one or more schemes, which are groups ofdatabase objects, such as tables (e.g., table2, table3), views (e.g.,view1, view3), and shares (e.g., share1).

In tables, the data is relational database data structured ascollections of columns and rows, where tables can include references toother tables (e.g., keys, indices, shared columns such as consumername). For instance, with reference to FIG. 6, a first table 600comprises three columns (patient name, age, and symptom) with rows foreach patient, and a second table 605 comprises two columns (patientname, zip) where the patient names are identical columns used toreference a given patient/user. For instance, a join operation or viewcan be created from the first table 600 and the second table to show zipcodes that different symptoms have appeared (e.g., by creating a view ornew table using the patient name, symptom, an zip columns). Althoughrelational database structures are discussed here as examples, it isappreciated that in some example embodiments the data managed by theshared data processing platform 100 can be data structured in anon-relational database format (e.g., no-SQL, Hadoop, Spark frames,etc.).

Returning to FIG. 5, as used here a view is a database object thatdisplays data from one or more tables (e.g., displaying certain columns,with a customized view schema). A view allows the result of a query tobe accessed as if the view is itself a table. While views can beutilized to exclude or hide columns to “mask” the data, hiding datausing views creates another object that must be managed, and if in agiven network environment there are many items to be masked, a largeamount of views must be managed, which creates significant overhead andmanagement complexity. Additionally, hiding data using views for maskingis agnostic to which role's access see the view (e.g., user engineersees the same view as the analyst user). Additionally, the views merelycreate a data object view and do not perform data transformation styleoperations (e.g., replace first three characters of a name withhashtags). Additionally, sharing views can comprise network security, asthe recipient of the view may be able to gain access to the underlyingdata used to create the view (e.g., access the full table from whichcolumns were pulled to create a given view).

A share is an object that is custom to the shared data processingplatform 100 that can be used to share data between users of thenetwork-based data warehouse system 102 in an efficient and securemanner. A share object comprises all information used to share a givendatabase. Each share includes, privileges that grant access to thedatabases and schema containing the objects to share, the privilegesthat grant access to specific objects (e.g., tables, secure views), andthe consumer accounts with which the database and its objects areshared. After a given database is created (e.g., by data provideraccount 505) the shared objects can be made available for access and/ormanipulation by other users (e.g., the consumer account 515) via cloudcomputing storage platform 104. For example, the provider account 505can create one or more database instances and then load the data 510into the database instances, create views and/or shared objects, andfurther create consumer accounts (e.g., reader accounts) that can accessthe database objects via the network-based data warehouse 102 and nodata needs to be transferred between the accounts; instead, the shareddata is accessed directly on the originating storage device. Forinstance, the consumer account 515 can login using a browser to access apage, generate a read-only database (e.g., “consumerDatabase”), andpopulate the shared data (e.g., “view3”) in the database for analysiswithout having to copy data from the storage device that stores theshared data.

FIGS. 7A-7E show example user interfaces for managing data using theshared data processing platform 100, according to some exampleembodiments. In the illustrative example, FIGS. 7A and 7B correspond toInternet browser user interfaces displayed on a device of the dataprovider account 505 (e.g., a laptop) and FIGS. 7C-7E are exampleInternet browser user interfaces displayed on another device of anotheruser logged in as the consumer account 515. While Internet browser userinterfaces are discussed in the illustrated examples, it is appreciatedthat the user interfaces can similarly be integrated into otherapplications, such as native applications of a client device operatingsystem (e.g., a mobile application on a smartphone, a Linux applicationon a Linux laptop, windows application on a Windows enabled laptop,etc.).

In FIG. 7A, the user interface 700 displays a window 705 for creatingreader accounts. The window 705 includes fields to create an accountname (e.g., the name of the consumer account 515, such as “bert” a dataanalyst in 3rd party company), and login fields such as a user namefield and password field. Upon selecting “Create Account” button inwindow 705, the consumer account 515 is created and linked to theprovider account 505 on the shared data processing platform 100 (e.g.,via access management system 110 and access management system 118).

In FIG. 7B, the user interface 710 displays a window 715 for creating ashare object and adding database objects (e.g., tables, views) to theshare object and specifying share object access (e.g., consumer accountswith which the share object is shared). For example, the “share name”field allows the share object to be named, the “database” field allowsdatabase objects to be included in the share object, such as the view3.The window 715 further includes a “consumer account” field that givesaccess to one or more consumer accounts (e.g., bert) to the sharedobject, and a Share Object link, which is a URL to the consumer account515 (e.g., a URL to a network service instance of consumer account 515).

Based on the user selecting the create button in window 715, the shareobject is created and access to the share object is assigned to theconsumer account 515 (e.g., Bert's account). The Share Object link canbe copied by the provider account and sent to other users (e.g., Bert)along with login information (e.g., username password) to access andactivate the consumer account 515 (e.g., a consumer account session as anetwork service).

FIG. 7C shows a user interface 720 displaying a login window 730 foraccessing share objects, according to some example embodiments. Inillustrative example, the user “Bert” receives the share object URL, theusername, and password information (e.g., via email) and displays theuser interface 720 using the share object URL in an address bar 725 ofan Internet Browser. Upon inputting the correct information into theuser name and password fields (e.g., the username and password datadiscussed in FIG. 7A above) and selecting the login button, a consumeraccount session is activated on the network-based data warehouse system102 for the consumer account 515. In the consumer account session, theuser can create additional database, query data, modify data, and accessdata objects shared with the consumer account (e.g., the share objectcreated and shared by provider account 505).

FIG. 7D shows a user interface 735 displaying a window 740 that may beused to create a database instance, according to some exampleembodiments. The user interface 735 can be displayed in response to thelogin button being selected with the correct information populating thelogin and password fields. The window 740 can be used by the consumeraccount 515 to create compute resources (e.g., virtual warehouses) anddatabase instance into which the share object (e.g., a read onlydatabase that displays Patient Data) is shared. For instance, using thecreate compute element, a drop-down menu is displayed that allows theconsumer (e.g., data consumer, consumer account 515 to create virtualwarehouses of different sizes (e.g., different size EC2 dusters, such asa small duster, medium cluster, and large duster), and generate adatabase on the virtual warehouse where the data populated into thedatabase is from the storage device of the provider account. Asdiscussed, the compute resources and the storage resources are decoupledand the consumer account 515 can manage (e.g., set-up payment, create,alter, terminate) virtual warehouses to access the share object data orother data (e.g., new data generated by another user of the consumeraccount, which is unrelated to the share object data).

The window 740 further includes identifier (“Share Data”) that indicateswhat shared data will be loaded into the database instance created onthe consumer account's virtual warehouse (“Patient Data”), and adatabase name field that allows the consumer account 515 to name thenewly created database that is populated by the share object data. Inresponse to receiving a selection of the create database button inwindow 740, a new virtual warehouse is generated for the consumeraccount 515 (e.g., a new EC2 duster of small size, such as four virtualmachines), a new database instance is generated on the new virtualwarehouse, and data from the share object is used to populate thedatabase. In this way, the consumer account handles the computeresources without affecting the systems of the data provider (e.g.,without affecting a projection server of the database provider thatgenerates and stores data 510).

FIG. 7E shows a user interface 745 for interacting with the share objectdata, according to some example embodiments. Continuing the example, auser of the consumer account 515 can use user interface 745 to interactwith the share object data on the newly created warehouse. For instance,the side panel 750 lists data that is managed by the newly createdwarehouse, the execution area 755 can receive code to execute againstthe share object data, and the results of the executed code is displayedin the results area 760. For instance, a user of the consumer account515 can input a SQL query into the execution area 755, which is thenexecuted against the share object data in the newly created databaserunning on the new warehouse created by the consumer account in FIG. 7D.In this way, users of the consumer accounts can access and interact withlive production data of the provider account in a secure manner, whereupdates to the share object data (e.g., production server updates fromwhich the share object data is derived) occur in real time, and theconsumer's computations do not impinge the provider account systems asthe computations are performed on a virtual warehouse created andmanaged consumer account 515.

FIG. 8 shows an example data architecture 800 for dynamic masking ofshared data objects, according to some example embodiments. In theexample of FIG. 8, a data provider network 805 is a network (e.g.,private company network of a hospital) with provider users such asprovider user 807 that manage provider data, such as tables 809. Thedata provider network 805 seeks to share access to the tables 809 in acontrolled manner with data consumer network 810 (e.g., an infectiousdisease think-tank). In an example, the provider user 807 is a doctoruser of the data provider network 805, and the tables 809 can comprisedatabase objects such as table 600 and table 605 in FIG. 6, and theprovider user 807 seeks to share the tables 809 with users in the othercompany (e.g., data consumer network) for analysis, where the tables 809undergoes dynamic data masking via share mask engine on thenetwork-based data warehouse system 102. Conventionally, to share datathe data provider uploads the data to a network location (e.g., FTP tocloud storage 615) and the data would then be downloaded to the dataconsumer network 810. This conventional approach is problematic, atleast because when the amount of data is large (e.g., as in a globalenterprise network), uploading and downloading data may be a very slowif not completely impractical process that incurs large networkoverheads. Additionally, these approaches have minimal privacyprotections as the data is shared in an all-or-nothing approach, inwhich the data consumer 810 has access to all of the shared data or noneof the shared data (e.g., sharing just a few columns would necessitate anew data object be created and then the new data object is shared, whichmay be equally burdensome and impractical as the size of the data sharedgrows). Additionally, in the conventional approaches, once the data issent to the data consumer, the sent data is instantly out of date themoment any changes are made to the original data (e.g., updates totables 809). While the data consumer network 810 may prefer directaccess to the tables 809 (e.g., access to production server data), manydata providers will not provide such direct access for privacy ornetwork security concerns (e.g., to comply with legal data privacy laws,to avoid potential malicious network abuse such as hacking).

To address the foregoing, the network-based data warehouse system 102uses the share mask engine 225 to enable the data provider network 805(e.g., users in the data provider network such as provider user 808) toshare access to the live data with the data consumer network 810 (e.g.,users in the data consumer network 810 such as consumer_1 andconsumer_2) in a secure mask-able approach, according to some exampleembodiments. For instance, as illustrated, the provider user 807 canupload the tables 809 to cloud storage 815 and then give access to thenetwork-based data warehouse system 102 to access the cloud storage 815to retrieve or reference the data (e.g., external tables) for maskingand queries. Alternatively or in addition to the cloud-stored data, theprovider user 807 can upload some or all of the data to databases in thenetwork-based data warehouse system 102, such as database 116. Theprovider user 807 specifies one or more policies as policy data 817 thatdynamically masks the uploaded data per policy roles and functions asspecified by masking rules of a given policy. The policy data 817 canmap to locally stored data (e.g., data in database 116) and/or map todata in the cloud storage 815 (e.g., external read only tables) toprovide dynamic masking per the policy data 817 when the data isrequested by consumers, such as consumer_1 811 and consumer_2 812 viathe network-based data warehouse system 102.

The policy data 817 can specify roles and how corresponding datareferenced by the policy can be interacted with by users havingdifferent roles. For example, the consumer_1 can be designated (e.g.,via user account information of consumer_1) as a data engineer role onthe network-based data warehouse system 102 and the consumer_2 can bedesignated (via user account information of consumer_2) as a doctor onthe network-based data warehouse system 102. In this example, when theconsumers request access to the tables 809 through the network-baseddata warehouse system 102 (e.g., consumer account session), the sharemask engine 225 accesses the policy data 817 and modifies data per theroles and functions in the policy data 817. For instance, the policydata may specify that data engineer roles should not see a given column(e.g., full name of patients) in policied object 827, whereas users withthe doctor role (e.g., consumer_2) can see the give column in policiedobject 837, where seeing can be visibility, untransformed format, orperform manipulations with the data (e.g., join operations to join datafrom multiple tables).

In this way, the users of the data provider network 805 can shareportions of the data with the data consumer network 810 in a dynamicallymasked approach, where the underlying shared data may be from disparatesources. For example, assume table 600 in FIG. 6 is stored in database116 and is readable and modifiable by the network-based data warehousesystem 102, and further assume that table 605 is an external table oncloud storage 815 that is a read only table that can only be referencedby the network-based data warehouse system 102. Given these constraints,the provider user 807 can create a view that is shared where the viewpulls data from the first local table (e.g., symptom data for a givencustomer) and also pull data from the second external table (e.g., zipdata of a given customer), while optionally including the patient columnor transforming the patient name column (e.g., show only the firstinitial), or anonymize other data (e.g., changing the zip information toregional information such as city, county, or state data), while keepingthe accessed share data (e.g., 827 and 837) live and update to date, asthe data is masked dynamically (e.g., upon being queried in sessions ofthe consumer accounts).

FIG. 9 shows example policy data architecture 900, according to someexample embodiments. The resource 905 is a data store (e.g., database,table, view, share) that is mapped to masking policy 910 comprising oneor more rules. In some example embodiments, in response to a givenresource 905 being requested (e.g., requested to populate a database ofconsumer account 515), the share mask engine 225 identifies the maskingpolicy 910 to implement share masking. The masking policy 910 includesone or more rules 920, each of which can comprise one or more roles 925and one or more functions 930 to implement if the role is fulfilled.That is, the rules 920 are the logic (e.g., if/then), the roles 925 areconditions, and the functions 930 are the operations (e.g., user definedfunctions (UDFs)) implemented on the resource 905 if the logic and theconditions are satisfied.

A function 930 can be created as a user-defined functions that operateusing a query language, such as a SQL UDF that evaluates an SQLexpression and returns results of the expression. The expressiondefining a UDF can refer to the input arguments of the function, and todatabase objects such as tables, views, and sequences. The UDF owner(e.g., a user defining the UDF) must have appropriate privileges on anydatabase objects that the UDF accesses, according to some exampleembodiments. A SQL UDF's defining expression can refer to otheruser-defined functions, though generally the UDF does not recursivelyrefer to itself, either directly or through another function callingback to it. As a simple example, the following SQL statements can beinput into execution area 755 to create a function to calculate the areaof a circle:

  ::::::::::::::::Code 1 - Begin::::::::::::::::  CREATE FUNCTIONarea_of_circle(radius FLOAT)   RETURNS FLOAT   AS   $$    pi( ) *radius * radius   $$  ; ::::::::::::::::Code 1 - End::::::::::::::::

The function can be triggered using a query expression (e.g., the SELECTexpression), as follows:

  ::::::::::::::::Code 2 - Begin:::::::::::::::: SELECTarea_of_circle(1.0); ::::::::::::::::Code 2 - End::::::::::::::::

Which returns an output (e.g., displayed in the results area 760 in FIG.7E) of:

  ::::::::::::::::Code 3 - Begin::::::::::::::::+-----------------------------------+ |  AREA_OF_CIRCLE(1.0)  | |---------------------------------- | |    3.151592654    |+-----------------------------------+ ::::::::::::::::Code 3 -End::::::::::::::::

Examples of functions for masking include: hiding a column, masking thefirst three characters of each entry of a given column (e.g., hiding thearea code), masking the first five characters for each row, transform orobfuscate the ZIP (e.g., replace ZIP code information with city or stateinformation to blur where a given patient is located), join data fromtwo tables (e.g., a local table and an external read only data) andreturn a view, and other types of additional custom user definedoperations. It is appreciated that the example functions discussed areonly examples, and any database function can be included as function930. In some example embodiments, the masking policy 910 for the givenresource 905 maps to a default function 915, which is implemented if norule data (e.g., rule 920, roles 925, function 930) has been created.For example, the default function 915 can include: full mask of socialsecurity data, or by default give access to only three roles to a givenresource 905 (e.g., the CEO, CFO, and GC of a company receive fullaccess to a given resource 905).

Example policy code is included here as an example. The example code canbe implemented by the data provider account 505 to create, alter, orterminate policy data by inputting the example code into the executionarea 755 (e.g., browser window of an active session). In some exampleembodiments, the policy code is SQL that is stored in one or more policytables in policy data 817, which can then be referenced by the sharemask engine 225 to dynamically mask data.

The following represents an example syntax used to create a maskingpolicy, according to some example embodiments. In the below examples,each CASE statements represent the whole policy body, where each WHEN .. . THEN . . . clause specifies a rule. A policy can be created withmultiple rules and a default function where based on the executingcontext, e.g., role, share, one rule can be applied. A policy body is aSQL expression which can be specified using a CASE . . . END statementwhere each WHEN . . . THEN clause acts as a rule. The policy will beevaluated as a SQL expression, therefore, rules are evaluated in orderif specified as WHEN . . . THEN clauses in the body, according to someexample embodiments. Functions can be executed upon the role matchingand any additional conditions included in the WHEN . . . THEN, accordingto some example embodiments.

::::::::::::::::Code 4 - Begin:::::::::::::::: CREATE [ OR REPLACE ]MASKING POLICY <name> AS (val string) returns string ->  CASE   WHENcurrent_role( ) IN (′analyst′, ′dataeng′) THEN DB1.   UNMASK(val)//analyst and dataeng are roles, DB1.UNMASK is a path to a UDF passedthe val parameter   WHEN share( ) IN (′crm_table) THENDB1.PARTIAL_MASK(val, ′#′) // an additional condition for a share( )  ELSE DB1.SCHM1.FULL_MASK(val) END; ::::::::::::::::Code 4 -End::::::::::::::::

The following syntax is to drop a policy, according to some exampleembodiments.

  ::::::::::::::::Code 5 - Begin:::::::::::::::: DROP MASKING POLICY IFEXISTS zip_mask; ::::::::::::::::Code 5 - End::::::::::::::::

The following syntax will alter a masking policy to replace the existingrules with new ones. Additionally, alter can be used to set a newcomment for the masking policy, according to some example embodiments.

::::::::::::::::Code 6 - Begin:::::::::::::::: ALTER MASKING POLICY IFEXISTS zip_mask CASE WHEN EXECUTING_ROLE( ) IN (analyst, data_engineer)THEN db1.first3digits(number) WHEN EXECUTING_ROLE( ) IN (engineer,sales, sales_eng) THEN db1.first5digits(number) ELSEdb1.fullmask(number) END; ALTER MASKING POLICY IF EXISTS zip_mask ASdb1.fullmask(number); // alter an existing masking zip_mask to set a newcomment ALTER MASKING POLICY IF EXISTS zip_mask SET COMMENT = ′locationmasking policy for user data′ ::::::::::::::::Code 6 -End::::::::::::::::

It is further appreciated that although SQL is implemented in the aboveexamples, the masking policy can be stored and implemented in otherways, such as storing the policy as JSON data and performing maskingusing a scripting language (e.g., JavaScript).

Additionally, masking policies for objects can be combined when resourceobjects are combined, according to some example embodiments. Forexample, a first masking policy can be mapped to a database table, whereone or more columns of the database table in are included in a databaseview, where the view has its own masking policy mapped to it. In thisexample embodiments, the first masking policy may be dynamically appliedto the database table followed by applying the view masking policy togenerate resulting masked data. In this way, the database objects caneach have finely tuned policy masks that can be combined in differentconfigurations to create a tightly controlled data share architecture.

FIG. 10 shows a flow diagram of a method 1000 for configuring a sharemask policy with the resource item, according to some exampleembodiments. The method 1000 may be embodied in computer-readableinstructions for execution by one or more hardware components (e.g., oneor more processors) such that the operations of the method 100 may beperformed by components of network-based data warehouse system 102.Accordingly, the method 1000 is described below, by way of example withreference thereto. However, it shall be appreciated that the method 1000may be deployed on various other hardware configurations and is notintended to be limited to deployment within the network-based datawarehouse system 102.

At operation 1005, the share mask engine 225 identifies a storageresource from which data can be dynamically masked. For example, atoperation 1005 a table containing patient data is selected as a storageresource (e.g., by a user logged into a data provider account) to createa view or share that is dynamically masked.

At operation 1010, the share mask engine 225 stores one or morefunctions to be included in policy data. For example, at operation 1010a user defined function is created (e.g., by the data provider or a dataengineer/developer) to perform operations on data, such as fully maskinga given column, or transforming data in a given column (e.g.,transforming ZIP code data into city, county, or region data). In someexample embodiments, operation 1010 is optional; for example, where thefunctions that can be included in a policy have been already createdand/or the available functions are stored in a library of functions.

At operation 1015, the share mask engine 225 generates a share maskpolicy. For example, at operation 1015 the share mask engine 225 storesa policy mapped to the storage resource of operation 1005, and storesfurther mapping data including role data and functions to implement ifthe role data matches the user's role of the current session (e.g., asession of a login user requesting access).

At operation 1020, the share mask engine 225 receives data to bedynamically masked from a user of the provider account. The generateddatabase object may be the same as the storage resource object or may bederived from the stored resource object. For example, the storageresource object of operation 1005 may be a table as mentioned, and thedatabase object generated at operation 1020 may be a view thatincorporates one or more columns from the table. Because the databaseobject generated at operation 1020 (e.g., the view) includes columnsfrom the dynamically masked storage resource object (e.g., zip column inthe table identified at operation 1005), anytime the data the databaseobject (the view) is requested, the corresponding storage resource datais incorporated and the stored share mask policy is initiated for theview.

At operation 1025, the share mask engine 225 receives an instructionfrom the provider account 505 to transmit the database object. Forexample, at operation 1025, a user of the provider account 505 emails alink to the view to one or more other users of the network-based datawarehouse system 102, such another user of the consumer account 515.

FIG. 11 shows a flow diagram of a method 1100 for interacting with thedynamically masked data, according to some example embodiments. Themethod 1100 may be embodied in computer-readable instructions forexecution by one or more hardware components (e.g., one or moreprocessors) such that the operations of the method 1100 may be performedby components of network-based data warehouse system 102. Accordingly,the method 1100 is described below, by way of example with referencethereto. However, it shall be appreciated that the method 1100 may bedeployed on various other hardware configurations and is not intended tobe limited to deployment within the network-based data warehouse system102.

At operation 1105, the share mask engine 225 initiates a session for aconsumer account of the network-based data warehouse system 102. Forexample, at operation 1105, the consumer account 515 loads a loginscreen (FIG. 7C) by inputting a link for the view (received from theprovider account 505) into the address bar of a browser, logs in and ispresented with a consumer account user interface, such as user interface735 (FIG. 7D), where the link is for the database object transmitted at1025 (e.g., the data provider user emails the link to the object to thedata consumer user, where the link is access to database object that isto be dynamically masked per method 1000).

At operation 1110, the share mask engine 225 generates compute resources(e.g., virtual warehouses) for use by the consumer account (e.g., theconsumer account 515), where the compute resources can be used toinstantiate one or more databases to store share data (e.g., maskeddatabase objects). For example, as discussed above with reference toFIG. 7D, the consumer account 515 creates one or more virtual warehousesand creates a database instance.

At operation 1115, the share mask engine loads the shared and maskeddata for the consumer account 515. For example, at operation 1115 theshared data is automatically loaded into the database instance. Atoperation 1120, the consumer account 515 interacts with the shared databy inputting one or more SQL statements or expressions (e.g., SELECT)into an execution area 755 to query the shared mask object and returnresults in the results area 760 (FIG. 7E).

FIG. 12 shows a flow diagram of a method 1200 for dynamically maskingshared a database object, according to some example embodiments. Themethod 1200 may be implemented as a subroutine that is initiated by anaccount requesting access to the shared data (e.g., where the shareddata maps to a policy, or data from which the shared data is createdmaps to a policy). For example, in response to the data being loaded(e.g., requested by a consumer account) at operation 1115, the sharemask engine 225 can initiate the method 1100.

At operation 1205, the share mask engine 225 identifies a resource ID(e.g., source database table) of the requested data (e.g., a view thatincorporates a column from the source database table) and the role ID ofthe user of the consumer account 515 that is logged into an activesession. At operation 1210, the share mask engine 225 retrieves policydata that is mapped to the resource ID. At operation 1215, the sharemask engine 225 identifies one or more rules in the policy that forwhich conditions are satisfied. For example, at operation 1215 the sharemask engine 225 determines that the rule matches a specified role (e.g.,user role for active session), or matches any other specified rules inthe policy (e.g., a share( ) rule). If, at operation 1215, the sharemask engine 225 determines that there are no rules that match conditions(e.g., the role ID of the consumer account 515 is a “doctor” role andthere are no rules in the policy that specify doctor roles), the method1200 proceeds to operation 1220 in which a default function of thepolicy is executed and data is returned as a subroutine result.

Returning to operation 1215, assuming that there are one or more rulesfor the identified role ID of the consumer account of the activesession, the method 1200 proceeds to operation 1225 in which the userdefined function of the rule is executed and dynamically masked data isreturned for display (e.g., on the user device of the consumer accountuser). Further, as illustrated, the share mask engine 225 loops back to1215 if there are additional rules that are defined for the role ID ofthe consumer account 515 (e.g., a first function may transform data in agiven column and a second function may use the transformed data as inputdata for further transformations or masking operations; e.g., a givenrole has two functions that are activated, where each function operatesindependently or concurrently of the other). Assuming there areadditional rules, the method 1200 evaluates the rules and returns therules results at operation 1225 for further rules that match the roleID. After the method 1200 terminates the dynamically masked data isreturned by the share mask engine 225 to the consumer account system(e.g. a remote computing device 106 being operated by consumer account515) for analysis and further interaction (e.g., queries) by theconsumer account 515 as discussed in FIG. 11 (e.g., at operation 1120).

FIG. 13 illustrates a diagrammatic representation of a machine 1300 inthe form of a computer system within which a set of instructions may beexecuted for causing the machine 1300 to perform any one or more of themethodologies discussed herein, according to an example embodiment.Specifically, FIG. 13 shows a diagrammatic representation of the machine1300 in the example form of a computer system, within which instructions1316 (e.g., software, a program, an application, an applet, an app, orother executable code) for causing the machine 1300 to perform any oneor more of the methodologies discussed herein may be executed. Forexample, the instructions 1316 may cause the machine 1300 to execute anyone or more operations of any one or more of the methods 1000, 1100, and1200. As another example, the instructions 1316 may cause the machine1300 to implemented portions of the data flows illustrated in any one ormore of FIGS. 1-9. In this way, the instructions 1316 transform ageneral, non-programmed machine into a particular machine 1300 (e.g.,the remote computing device 106, the access management system 110, thecompute service manager 112, the execution platform 113, the accessmanagement system 118, the API gateway 120, remote computing device 106that is specially configured to carry out any one of the described andillustrated functions in the manner described herein.

In alternative embodiments, the machine 1300 operates as a standalonedevice or may be coupled (e.g., networked) to other machines. In anetworked deployment, the machine 1300 may operate in the capacity of aserver machine or a client machine in a server-client networkenvironment, or as a peer machine in a peer-to-peer (or distributed)network environment. The machine 1300 may comprise, but not be limitedto, a server computer, a client computer, a personal computer (PC), atablet computer, a laptop computer, a netbook, a smart phone, a mobiledevice, a network router, a network switch, a network bridge, or anymachine capable of executing the instructions 1316, sequentially orotherwise, that specify actions to be taken by the machine 1300.Further, while only a single machine 1300 is illustrated, the term“machine” shall also be taken to include a collection of machines 1300that individually or jointly execute the instructions 1316 to performany one or more of the methodologies discussed herein.

The machine 1300 includes processors 1310, memory 1330, and input/output(I/O) components 1350 configured to communicate with each other such asvia a bus 1302. In an example embodiment, the processors 1310 (e.g., acentral processing unit (CPU), a reduced instruction set computing(RISC) processor, a complex instruction set computing (CISC) processor,a graphics processing unit (GPU), a digital signal processor (DSP), anapplication-specific integrated circuit (ASIC), a radio-frequencyintegrated circuit (RFIC), another processor, or any suitablecombination thereof) may include, for example, a processor 1312 and aprocessor 1314 that may execute the instructions 1316. The term“processor” is intended to include multi-core processors 1310 that maycomprise two or more independent processors (sometimes referred to as“cores”) that may execute instructions 1316 contemporaneously. AlthoughFIG. 13 shows multiple processors 1310, the machine 1300 may include asingle processor with a single core, a single processor with multiplecores (e.g., a multi-core processor), multiple processors with a singlecore, multiple processors with multiple cores, or any combinationthereof.

The memory 1330 may include a main memory 1332, a static memory 1334,and a storage unit 1336, all accessible to the processors 1310 such asvia the bus 1302. The main memory 1332, the static memory 1334, and thestorage unit 1336 store the instructions 1316 embodying any one or moreof the methodologies or functions described herein. The instructions1316 may also reside, completely or partially, within the main memory1332, within the static memory 1334, within the storage unit 1336,within at least one of the processors 1310 (e.g., within the processor'scache memory), or any suitable combination thereof, during executionthereof by the machine 1300.

The I/O components 1350 include components to receive input, provideoutput, produce output, transmit information, exchange information,capture measurements, and so on. The specific I/O components 1350 thatare included in a particular machine 1300 will depend on the type ofmachine. For example, portable machines such as mobile phones willlikely include a touch input device or other such input mechanisms,while a headless server machine will likely not include such a touchinput device. It will be appreciated that the I/O components 1350 mayinclude many other components that are not shown in FIG. 13. The I/Ocomponents 1350 are grouped according to functionality merely forsimplifying the following discussion and the grouping is in no waylimiting. In various example embodiments, the I/O components 1350 mayinclude output components 1352 and input components 1354. The outputcomponents 1352 may include visual components (e.g., a display such as aplasma display panel (PDP), a light emitting diode (LED) display, aliquid crystal display (LCD), a projector, or a cathode ray tube (CRT)),acoustic components (e.g., speakers), other signal generators, and soforth. The input components 1354 may include alphanumeric inputcomponents (e.g., a keyboard, a touch screen configured to receivealphanumeric input, a photo-optical keyboard, or other alphanumericinput components), point-based input components (e.g., a mouse, atouchpad, a trackball, a joystick, a motion sensor, or another pointinginstrument), tactile input components (e.g., a physical button, a touchscreen that provides location and/or force of touches or touch gestures,or other tactile input components), audio input components (e.g., amicrophone), and the like.

Communication may be implemented using a wide variety of technologies.The I/O components 1350 may include communication components 1364operable to couple the machine 1300 to a network 1380 or devices 1370via a coupling 1382 and a coupling 1372, respectively. For example, thecommunication components 1364 may include a network interface componentor another suitable device to interface with the network 1380. Infurther examples, the communication components 1364 may include wiredcommunication components, wireless communication components, cellularcommunication components, and other communication components to providecommunication via other modalities. The devices 1370 may be anothermachine or any of a wide variety of peripheral devices (e.g., aperipheral device coupled via a universal serial bus (USB)). Forexample, as noted above, the machine 1300 may correspond to any one ofthe remote computing device 106, the access management system 110, thecompute service manager 112, the execution platform 113, the accessmanagement system 118, the API gateway 120, and the computing devices203, 207, 307, and 401, and the devices 1370 may include any other ofthese systems and devices.

The various memories (e.g., 1330, 1332, 1334, and/or memory of theprocessor(s) 1310 and/or the storage unit 1336) may store one or moresets of instructions 1316 and data structures (e.g., software) embodyingor utilized by any one or more of the methodologies or functionsdescribed herein. These instructions 1316, when executed by theprocessor(s) 1310, cause various operations to implement the disclosedembodiments.

As used herein, the terms “machine-storage medium,” “device-storagemedium,” and “computer-storage medium” mean the same thing and may beused interchangeably in this disclosure. The terms refer to a single ormultiple storage devices and/or media (e.g., a centralized ordistributed database, and/or associated caches and servers) that storeexecutable instructions and/or data. The terms shall accordingly betaken to include, but not be limited to, solid-state memories, andoptical and magnetic media, including memory internal or external toprocessors. Specific examples of machine-storage media, computer-storagemedia, and/or device-storage media include non-volatile memory,including by way of example semiconductor memory devices, e.g., erasableprogrammable read-only memory (EPROM), electrically erasableprogrammable read-only memory (EEPROM), field-programmable gate arrays(FPGAs), and flash memory devices; magnetic disks such as internal harddisks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROMdisks. The terms “machine-storage media,” “computer-storage media,” and“device-storage media” specifically exclude carrier waves, modulateddata signals, and other such media, at least some of which are coveredunder the term “signal medium” discussed below.

In various example embodiments, one or more portions of the network 980may be an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local-area network (LAN), a wireless LAN (WLAN), awide-area network (WAN), a wireless WAN (WWAN), a metropolitan-areanetwork (MAN), the Internet, a portion of the Internet, a portion of thepublic switched telephone network (PSTN), a plain old telephone service(POTS) network, a cellular telephone network, a wireless network, aWi-Fi® network, another type of network, or a combination of two or moresuch networks. For example, the network 1380 or a portion of the network1380 may include a wireless or cellular network, and the coupling 1382may be a Code Division Multiple Access (CDMA) connection, a GlobalSystem for Mobile communications (GSM) connection, or another type ofcellular or wireless coupling. In this example, the coupling 1382 mayimplement any of a variety of types of data transfer technology, such asSingle Carrier Radio Transmission Technology (1×RTT), Evolution-DataOptimized (EVDO) technology, General Packet Radio Service (GPRS)technology, Enhanced Data rates for GSM Evolution (EDGE) technology,third Generation Partnership Project (3GPP) including 3G, fourthgeneration wireless (4G) networks, Universal Mobile TelecommunicationsSystem (UMTS), High-Speed Packet Access (HSPA), WorldwideInteroperability for Microwave Access (WiMAX), Long Term Evolution (LTE)standard, others defined by various standard-setting organizations,other long-range protocols, or other data transfer technology.

The instructions 1316 may be transmitted or received over the network1380 using a transmission medium via a network interface device (e.g., anetwork interface component included in the communication components1364) and utilizing any one of a number of well-known transfer protocols(e.g., hypertext transfer protocol (HTTP)). Similarly, the instructions1316 may be transmitted or received using a transmission medium via thecoupling 1372 (e.g., a peer-to-peer coupling) to the devices 1370. Theterms “transmission medium” and “signal medium” mean the same thing andmay be used interchangeably in this disclosure. The terms “transmissionmedium” and “signal medium” shall be taken to include any intangiblemedium that is capable of storing, encoding, or carrying theinstructions 1316 for execution by the machine 1300, and include digitalor analog communications signals or other intangible media to facilitatecommunication of such software. Hence, the terms “transmission medium”and “signal medium” shall be taken to include any form of modulated datasignal, carrier wave, and so forth. The term “modulated data signal”means a signal that has one or more of its characteristics set orchanged in such a manner as to encode information in the signal.

The terms “machine-readable medium,” “computer-readable medium,” and“device-readable medium” mean the same thing and may be usedinterchangeably in this disclosure. The terms are defined to includeboth machine-storage media and transmission media. Thus, the termsinclude both storage devices/media and carrier waves/modulated datasignals.

The various operations of example methods described herein may beperformed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Similarly, the methods described hereinmay be at least partially processor-implemented. For example, at leastsome of the operations of the methods 1000, 1100, and 1200 may beperformed by one or more processors. The performance of certain of theoperations may be distributed among the one or more processors, not onlyresiding within a single machine, but also deployed across a number ofmachines. In some example embodiments, the processor or processors maybe located in a single location (e.g., within a home environment, anoffice environment, or a server farm), while in other embodiments theprocessors may be distributed across a number of locations.

Although the embodiments of the present disclosure have been describedwith reference to specific example embodiments, it will be evident thatvarious modifications and changes may be made to these embodimentswithout departing from the broader scope of the inventive subjectmatter. Accordingly, the specification and drawings are to be regardedin an illustrative rather than a restrictive sense. The accompanyingdrawings that form a part hereof show, by way of illustration, and notof limitation, specific embodiments in which the subject matter may bepracticed. The embodiments illustrated are described in sufficientdetail to enable those skilled in the art to practice the teachingsdisclosed herein. Other embodiments may be used and derived therefrom,such that structural and logical substitutions and changes may be madewithout departing from the scope of this disclosure. This DetailedDescription, therefore, is not to be taken in a limiting sense, and thescope of various embodiments is defined only by the appended claims,along with the full range of equivalents to which such claims areentitled.

Such embodiments of the inventive subject matter may be referred toherein, individually and/or collectively, by the term “invention” merelyfor convenience and without intending to voluntarily limit the scope ofthis application to any single invention or inventive concept if morethan one is in fact disclosed. Thus, although specific embodiments havebeen illustrated and described herein, it should be appreciated that anyarrangement calculated to achieve the same purpose may be substitutedfor the specific embodiments shown. This disclosure is intended to coverany and all adaptations or variations of various embodiments.Combinations of the above embodiments, and other embodiments notspecifically described herein, will be apparent, to those of skill inthe art, upon reviewing the above description.

In this document, the terms “a” or “an” are used, as is common in patentdocuments, to include one or more than one, independent of any otherinstances or usages of “at least one” or “one or more.” In thisdocument, the term “or” is used to refer to a nonexclusive or, such that“A or B” includes “A but not B,” “B but not A,” and “A and B,” unlessotherwise indicated. In the appended claims, the terms “including” and“in which” are used as the plain-English equivalents of the respectiveterms “comprising” and “wherein.” Also, in the following claims, theterms “including” and “comprising” are open-ended; that is, a system,device, article, or process that includes elements in addition to thoselisted after such a term in a claim is still deemed to fall within thescope of that claim.

The following numbered examples are embodiments:

1. A method comprising: identifying, on a network site, a databaseobject generated by a first client device of a first end-user of thenetwork site; receiving, from the first client device, a share maskingpolicy for modifying data in the database object, the share maskingpolicy specifying a user role type to initiate one or more preconfiguredmasking operations on the database object; generating a network link foraccess to the database object by a second end-user of the network site;receiving, from a second client device of the second end-user, a requestto access the database data using the network link; in response to therequest from the second client device, determining that an end-user roleof the second end-user matches the user role type of the share maskingpolicy; in response to the end-user role matching the user role type ofthe share masking policy, applying the one or more preconfigured maskingoperations on the database object to generate a masked database object;and causing, the second client device of the second end-user, apresentation of result data from the masked database object.

2. The method of example 1, wherein the request from the second clientdevice is a query.

3. The method of examples 1 or 2, wherein the query comprises a selectstatement, and wherein the select statement is applied to the maskeddatabase object to generate the result data displayed in thepresentation.

4. The method of any one of examples 1-3, wherein the database object isstored in a first database instance managed by the first end-user,wherein the masked database object is hosted on a second databaseinstance managed by the second end-user without copying the databaseobject from the first database instance to the second database instance.

5. The method of any one of examples 1-4, wherein the database objectcomprises one or more external tables.

6. The method of any one of examples 1-5, wherein the share maskingpolicy is received in structured query language (SQL) format and storedin a share masking database.

7. The method of any one of examples 1-6, wherein the share maskingpolicy is mapped to the database object, the share masking policycomprising a plurality of user role types including the user role type,wherein each of the plurality of user role types is mapped to a functionthat masks the database object.

8. The method of any one of examples 1-7, wherein the function is adatabase function that is executable against the database object tocause one or more transformations to one or more columns of the databaseobject.

9. The method of any one of examples 1-8, wherein: the share maskingpolicy is a first share masking policy; and the database object is adatabase view that is mapped to the share masking policy, the databaseview incorporating data from a database table that is mapped to a secondshare masking policy.

10. The method of any one of examples 1-9, wherein the second sharemasking policy is implemented on the database table to generate maskedtable data that is incorporated in the database view, wherein thedatabase view that includes the masked table data is further maskedaccording to the share masking policy to generate the masked databaseobject.

11. A system comprising: one or more processors of a machine; and amemory storing instructions that, when executed by the one or moreprocessors, cause the machine to perform operations implementing any oneof example methods 1 to 10.

12. A machine-readable storage device embodying instructions that, whenexecuted by a machine, cause the machine to perform operationsimplementing one of methods 1 to 10.

1. A method comprising: identifying a database object on a network site;receiving, from a first client device of a first end-user of the networksite, a share masking policy for modifying data in the database object,the share masking policy comprising a plurality of database user definedfunctions (UDFs) to initiate masking operations on the database objectin response to one or more of a plurality of end-user role types ofend-users requesting access to the database object on the network site,each of the plurality of end-user role types being mapped, by the firstend-user of the network site, to a different database UDF of theplurality of database UDFs; receiving a request to access the databaseobject from a second client device of a second end-user; determiningthat an end-user role of the second end-user matches one of theplurality of end-user role types in the share masking policy; applyingthe one of the plurality of database UDFs on the database object togenerate masked data; and causing, on the second client device, apresentation of the masked data.
 2. The method of claim 1, wherein therequest from the second client device comprises a query.
 3. The methodof claim 2, wherein the query comprises a select statement, and whereinthe select statement is applied to the masked data.
 4. The method ofclaim 1, wherein the database object is stored in a first databaseinstance managed by the first end-user, wherein the masked data ishosted on a second database instance managed by the second end-userwithout copying the database object from the first database instance tothe second database instance.
 5. The method of claim 1, wherein thedatabase object comprises is a database view that includes data from oneor more external tables that are read-only tables.
 6. The method ofclaim 1, wherein the share masking policy is received in structuredquery language (SQL) format and stored in a share masking database. 7.The method of claim 1, wherein the share masking policy is mapped to thedatabase object.
 8. The method of claim 1, wherein the plurality ofdatabase UDFs are SQL UDFs, and wherein the method further comprises:receiving, from the first client device, the plurality of end-user roletypes in a SQL format; receiving, from the first client device, the SQLUDFs to apply to the database object upon a request to the databaseobject being received from at least one of the plurality of end-userrole types; and storing the plurality of end-user role types andcorresponding SQL UDFs as the share masking policy for modifying data ofthe database object.
 9. The method of claim 1, wherein: the sharemasking policy is a first share masking policy; and the database objectis a database view that is mapped to the share masking policy, thedatabase view incorporating data from a database table that is mapped toa second share masking policy.
 10. The method of claim 9, wherein thesecond share masking policy is implemented on the database table togenerate masked table data that is incorporated in the database view,wherein the database view that includes the masked table data is furthermasked according to the share masking policy to generate the masked datathat is displayed on the second client device.
 11. A system comprising:one or more processors of a machine; and a memory storing instructionsthat, when executed by the one or more processors, cause the machine toperform operations comprising: identifying a database object on anetwork site; receiving, from a first client device of a first end-userof the network site, a share masking policy for modifying data in thedatabase object, the share masking policy comprising a plurality ofdatabase user defined functions (UDFs) to initiate masking operations onthe database object in response to one or more of a plurality ofend-user role types requesting access to the database object on thenetwork site, each of the plurality of end-user role types being mapped,by the first end-user of the network site, to a different database UDFof the plurality of database UDFs; receiving a request to access thedatabase object from a second client device of a second end-user;determining that an end-user role of the second end-user matches one ofthe plurality of end-user role types in the share masking policy;applying the one of the plurality of database UDFs on the databaseobject to generate masked data; and causing, on the second clientdevice, a presentation of the masked data.
 12. The system of claim 11,wherein the request from the second client device comprises a query. 13.The system of claim 12, wherein the query comprises a select statement,and wherein the select statement is applied to the masked data.
 14. Thesystem of claim 11, wherein the database object is stored in a firstdatabase instance managed by the first end-user, wherein the masked datais hosted on a second database instance managed by the second end-userwithout copying the database object from the first database instance tothe second database instance.
 15. The system of claim 11, wherein thedatabase object comprises is a database view that includes data from oneor more external tables that are read-only tables.
 16. The system ofclaim 11, wherein the share masking policy is received in structuredquery language (SQL) format and stored in a share masking database. 17.The system of claim 11, wherein the share masking policy is mapped tothe database object.
 18. The system of claim 11, wherein the pluralityof database UDFs are SQL UDFs, and wherein the operations furthercomprises: receiving, from the first client device, the plurality ofend-user role types in a SQL format; receiving, from the first clientdevice, the SQL UDFs to apply to the database object upon a request tothe database object being received from at least one of the plurality ofend-user role types; and storing the plurality of end-user role typesand corresponding SQL UDFs as the share masking policy for modifyingdata of the database object.
 19. The system of claim 11, wherein: theshare masking policy is a first share masking policy; and the databaseobject is a database view that is mapped to the share masking policy,the database view incorporating data from a database table that ismapped to a second share masking policy.
 20. The system of claim 19,wherein the second share masking policy is implemented on the databasetable to generate masked table data that is incorporated in the databaseview, wherein the database view that includes the masked table data isfurther masked according to the share masking policy to generate themasked data that is displayed on the second client device.
 21. Amachine-readable storage device embodying instructions that, whenexecuted by a machine, cause the machine to perform operationscomprising: identifying a database object on a network site; receiving,from a first client device of a first end-user of the network site, ashare masking policy for modifying data in the database object, theshare masking policy comprising a plurality of database user definedfunctions (UDFs) to initiate masking operations on the database objectin response to one or more of a plurality of end-user role typesrequesting access to the database object on the network site, each ofthe plurality of end-user role types being mapped, by the first end-userof the network site, to a different database UDF of the plurality ofdatabase UDFs; receiving a request to access the database object from asecond client device of a second end-user; determining that an end-userrole of the second end-user matches one of the plurality of end-userrole types in the share masking policy; applying the one of theplurality of database UDFs on the database object to generate maskeddata; and causing, on the second client device, a presentation of themasked data.
 22. The machine-readable storage device of claim 21,wherein the request from the second client device comprises a query. 23.The machine-readable storage device of claim 22, wherein the querycomprises a select statement, and wherein the select statement isapplied to the masked data.
 24. The machine-readable storage device ofclaim 21, wherein the database object is stored in a first databaseinstance managed by the first end-user, wherein the masked data ishosted on a second database instance managed by the second end-userwithout copying the database object from the first database instance tothe second database instance.
 25. The machine-readable storage device ofclaim 21, wherein the database object comprises is a database view thatincludes data from one or more external tables that are read-onlytables.
 26. The machine-readable storage device of claim 21, wherein theshare masking policy is received in structured query language (SQL)format and stored in a share masking database.
 27. The machine-readablestorage device of claim 21, wherein the share masking policy is mappedto the database object.
 28. The machine-readable storage device of claim21, wherein the plurality of database UDFs are SQL UDFs, and wherein theoperations further comprises: receiving, from the first client device,the plurality of end-user role types in a SQL format; receiving, fromthe first client device, the SQL UDFs to apply to the database objectupon a request to the database object being received from at least oneof the plurality of end-user role types; and storing the plurality ofend-user role types and corresponding SQL UDFs as the share maskingpolicy for modifying data of the database object.
 29. Themachine-readable storage device of claim 21, wherein: the share maskingpolicy is a first share masking policy; and the database object is adatabase view that is mapped to the share masking policy, the databaseview incorporating data from a database table that is mapped to a secondshare masking policy.
 30. The machine-readable storage device of claim29, wherein the second share masking policy is implemented on thedatabase table to generate masked table data that is incorporated in thedatabase view, wherein the database view that includes the masked tabledata is further masked according to the share masking policy to generatethe masked data that is displayed on the second client device.